"""djangoProject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from app01.views import admin, account, iot, mqtt

urlpatterns = [
    # path('admin/', admin.site.urls),



    path('admin/list/', admin.admin_list),
    path('admin/add/', admin.admin_add),
    path('admin/<int:nid>/edit/', admin.admin_edit),
    path('admin/<int:nid>/delete/', admin.admin_delete),
    path('admin/<int:nid>/reset/', admin.admin_reset),

    path('login/', account.login),
    path('logout/', account.logout),
    path('image/code/', account.image_code),



    # 物联网数据采集显示
    path('iot/views/', iot.iot_views),
    path('iot/chart1/', iot.iot_chart1),
    path('iot/chart2/', iot.iot_chart2),
    path('iot/chart3/', iot.iot_chart3),

    # 下发命令
    path('mqtt/view/<int:nid>/', mqtt.view),

    path('iot/equipment/', iot.equipment),
    path('equipment/delete/', iot.equipment_delete),
    path('equipment/add/', iot.equipment_add),
    path('equipment/detail/', iot.equipment_detail),
    path('equipment/edit/', iot.equipment_edit),
    path('equipment/cmd/', iot.equipment_cmd),

]
